{
 "metadata": {
  "name": "",
  "signature": "sha256:af672896b1637a5da67c14c04c33320f0636f585569e69d1805343600a88e5ac"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import networkx as nx\n",
      "from nilmtk import Appliance, Mains, ElectricityMeter\n",
      "graph = nx.DiGraph()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Couldn't import dot_parser, loading of dot files will not be possible.\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Mains(1, 'REDD')\n",
      "Appliance(type='fridge', instance=1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "Appliance(type='fridge', instance=1)"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "graph.add_edge(Mains(1, 'REDD'), \n",
      "               ElectricityMeter(instance=1, building=1, dataset='REDD', \n",
      "                                appliances=[Appliance(type='fridge', instance=1)]))\n",
      "graph.add_edge(Mains(1, 'REDD'), \n",
      "               ElectricityMeter(instance=2, building=1, dataset='REDD', \n",
      "                                appliances=[Appliance(type='fridge', instance=2)]))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "graph.nodes()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "[ElectricityMeter(instance=2, building=1, dataset='REDD', appliances=set([Appliance(type='fridge', instance=2)])),\n",
        " ElectricityMeter(instance=1, building=1, dataset='REDD', appliances=set([Appliance(type='fridge', instance=1)])),\n",
        " Mains(building=1, dataset='REDD')]"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "graph.edges()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 6,
       "text": [
        "[(Mains(building=1, dataset='REDD'),\n",
        "  ElectricityMeter(instance=2, building=1, dataset='REDD', appliances=set([Appliance(type='fridge', instance=2)]))),\n",
        " (Mains(building=1, dataset='REDD'),\n",
        "  ElectricityMeter(instance=1, building=1, dataset='REDD', appliances=set([Appliance(type='fridge', instance=1)])))]"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}